<!DOCTYPE html>
<html>
<head>
    <title>查看</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script type="text/javascript">
        // 获取地址栏参数
        let dId = document.location.toString().GetValue("dId");
        // 通过主键查询
        function queryById(){
            layer.load(0)
            $.ajax({
                type: "GET",
                // 1. url请求地址前加后端API地址origin
                url: origin + "/doctor/" + dId,
                data: {jwtToken:jwtToken},
                dataType: "json",
                // 2. 允许携带cookie跨域请求
                xhrFields: {
                    withCredentials: true
                },
                crossDomain: true,
                success: function (data) {
                    layer.closeAll()
                    if(data.code == 200){
                        let doctor = data.obj;
                        // 填充信息
                        $("#doctorName").text(doctor.user.uTrueName);
                        $("#dIdCar").text(doctor.dIdCar);
                        $("#dPhone").text(doctor.dPhone);
                        $("#dTelphone").text(doctor.dTelphone);
                        if(doctor.dSex == 0){
                            $("#dSex").text("男");
                        }else{
                            $("#dSex").text("女");
                        }
                        $("#dAge").text(doctor.dAge);
                        $("#dBirthday").text(doctor.dBirthday);
                        $("#dEmail").text(doctor.dEmail);
                        $("#dKeshi").text(doctor.dKeshi);
                        $("#dXueli").text(doctor.dXueli);
                        $("#dDesc").text(doctor.dDesc);
                    }else{
                        layer.msg(data.msg,function(){});
                    }
                },
                complete : function(xhr, status) {
                    myComplete(xhr, status);
                }
            })
        }
        /*返回列表函数*/
        function back() {
            $('#backid').click(function(){
                window.location.href="index.html?pageNum="+globalPageNum+"&pageSize="+globalPageSize;
            });
        }
        $(function () {
            // 通过主键查询
            queryById();
            // 监听返回
            back();
        });
    </script>
</head>
<body>
<div class="definewidth m20">
    <table id="myQuery" class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">姓名</td>
            <td id="doctorName"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">证件类型</td>
            <td>身份证</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">证件号</td>
            <td id="dIdCar"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">手机</td>
            <td id="dPhone"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">座机</td>
            <td id="dTelphone"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">性别</td>
            <td id="dSex"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">年龄</td>
            <td id="dAge"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">出生年月</td>
            <td id="dBirthday"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">电子邮箱</td>
            <td id="dEmail"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">所属科室</td>
            <td id="dKeshi"></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">学历</td>
            <td id="dXueli"></td>
        </tr>
	    <tr>
            <td width="10%" class="tableleft">备注</td>
            <td id="dDesc"></td>
	    </tr>
        <tr>
            <td colspan="2"><center>
				<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
			</center></td>
        </tr>
    </table>
    <tbody>
        <!--加载之后展示的数据-->
    </tbody>
</div>
</body>
</html>